package com.jiliason.testTools.exception;

import java.io.PrintStream;
import java.io.PrintWriter;

public class CustomException extends Exception{
    private String customMessage;

    public CustomException(String message, Throwable cause, String customMessage) {
        super(message, cause);
        this.customMessage = customMessage;
    }

    @Override
    public void printStackTrace(PrintStream s) {
        s.println(customMessage);
        super.printStackTrace(s);
    }

    @Override
    public void printStackTrace(PrintWriter s) {
        s.println(customMessage);
        super.printStackTrace(s);
    }
}
